#include <iostream>
using namespace std;

class Animal {
public:
    virtual void sound() {
        cout << "Animal sounds" << endl;
    }
};

class Dog : public Animal {
public:
    void sound() 
    {
        cout << "Dog barks" << endl;
    }
};

class Cat: public Animal
{
    public:
        void sound()
        {
            cout<<"Cat miao"<<endl;
        }
};

int main() {
    Animal a;
    Dog d;
    Cat c;
    a.sound();
    d.sound();
    c.sound();
}